package jsi.spring;

import java.util.List;

import jsi.spring.OsobaServiceSimpleImpl.CheckedDataAccessException;

import org.hibernate.SessionFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionTemplate;

public interface OsobaService extends OsobaDao{

	public void saveOsoba(Osoba o);

	@Transactional(readOnly = true)
	public Osoba findOsobaByName(String imie);

	public void setMySessionFactory(SessionFactory sf);

	public void incOsobaAge(Osoba o);

	public void deleteAll();

	public List<Osoba> getAllOsoba();

	public void saveTwoPersons(Osoba o1, Osoba o2);

	public void saveTwoPersonsWithException(Osoba o1, Osoba o2, boolean throww)
			throws CheckedDataAccessException;

	public TransactionTemplate getTt();

}